//
//  YXYImageCollectionViewCell.m
//  Topit
//
//  Created by dllo on 15/12/3.
//  Copyright © 2015年 YXY. All rights reserved.
//

#import "YXYImageCollectionViewCell.h"

@implementation YXYImageCollectionViewCell
- (void)dealloc {
    [_images release];
    [super dealloc];
}

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.images = [[UIImageView alloc] initWithFrame:CGRectZero];
        self.images.contentMode = UIViewContentModeScaleAspectFill;
        self.images.clipsToBounds = YES;
        [self addSubview:self.images];
        [_images release];
    }
    return self;
}

- (void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes {
    self.images.frame = CGRectMake(1, 0, self.frame.size.width - 2, self.frame.size.height - 2);
    [self.images nightMode];
}


@end
